'''
Created on 23/09/2012

@author: Charles
'''
import unittest
from StructuralModel import *

class StructuralModelTest(unittest.TestCase):


    def setUp(self):
        self.model = StructuralModel("StructuralModelTest.xml")


    def tearDown(self):
        pass


    def testDataParser(self):
        data = self.model.dataParser(stream)
        self.assertTrue(data == {"Open":"2034", "Closed":"5607", "Value":"23.04", "Volume":"34069"})
        self.assertTrue()
    
    def testFindData(self):
        parser = self.model.dataParser("NothingxmltestxmlhtmlnewhtmlNothing")
        item = self.model.findData(parser)
        print item.getId()
        self.assertTrue(item.getMapping() == "test", "Failure it returned {0}".format(item.getMapping()))
        

if __name__ == "__main__":
    #import sys;sys.argv = ['', 'Test.testName']
    unittest.main()